/* Base Styles */
:root {
    --primary-bg: #FFFFFF;
    --text-color: #333333;
    --header-color: #1A365D;
    --link-color: #2B6CB0;
    --border-color: #E2E8F0;
    --chart-color-1: #FF6384;
    --chart-color-2: #36A2EB;
    --chart-color-3: #FFCE56;
    --chart-color-4: #4BC0C0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-bg);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--header-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

/* Header Styles */
.main-header {
    background-color: var(--header-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-banner {
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(rgba(26, 54, 93, 0.9), rgba(26, 54, 93, 0.9)),
                url('data:image/svg+xml,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="none" stroke="white" stroke-opacity="0.1"/></svg>');
}

.header-banner h1, .header-banner h2 {
    color: white;
}

.main-nav {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--chart-color-3);
}

/* Introduction Section */
.intro-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Visualizations Section */
.visualization-box {
    margin-bottom: 60px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.chart-description {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Analysis Section */
.analysis-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Principles Section */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.principle-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Conclusions Section */
.key-takeaways {
    max-width: 800px;
    margin: 0 auto 40px;
}

/* Footer */
.main-footer {
    background: var(--header-color);
    color: white;
    padding: 40px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.footer-content h3 {
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--header-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    font-size: 20px;
    transition: background-color 0.3s;
}

.back-to-top:hover {
    background-color: var(--link-color);
}

/* Responsive Design */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .intro-content,
    .analysis-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Print Styles */
@media print {
    .main-nav,
    .back-to-top {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}